<?php

/**
 * almacena los datos y la logica necesaria para inerpretar los datos antropometricos
 * por edad de los infantes
 * @author Mauricio Chamorro<mrchamorro@utn.edu.ec>
 */
class rangosCurvasOms {

    /**
     * Contenedoor de medidas de peso por edad para los infantes
     * @var array()
     */
    private static $rangoPeso = array(
        'FEMENINO' => array(
            0 => array(2, 2.4, 2.8, 3.7, 4.2, 4.8),
            1 => array(2.7, 3.2, 3.6, 4.8, 5.5, 6.2),
            2 => array(3.4, 3.9, 4.5, 5.8, 6.6, 7.5),
            3 => array(4, 4.5, 5.2, 6.6, 7.5, 8.5),
            4 => array(4.4, 5, 5.7, 7.3, 8.2, 9.3),
            5 => array(4.8, 5.4, 6.1, 7.8, 8.8, 10.0),
            6 => array(5.1, 5.7, 6.5, 8.2, 9.3, 10.6),
            7 => array(5.3, 6, 6.8, 8.6, 9.8, 11.1),
            8 => array(5.6, 6.3, 7, 9, 10.2, 11.6),
            9 => array(5.8, 6.5, 7.3, 9.3, 10.5, 12),
            10 => array(5.9, 6.7, 7.5, 9.6, 10.9, 12.4),
            11 => array(6.1, 6.9, 7.7, 9.9, 11.2, 12.8),
            12 => array(6.3, 7, 7.9, 10.1, 11.5, 13.1),
            13 => array(6.4, 7.2, 8.1, 10.4, 11.8, 13.5),
            14 => array(6.6, 7.4, 8.3, 10.6, 12.1, 13.8),
            15 => array(6.7, 7.6, 8.5, 10.9, 12.4, 14.1),
            16 => array(6.9, 7.7, 8.7, 11.1, 12.6, 14.5),
            17 => array(7, 7.9, 8.9, 11.4, 12.9, 14.8),
            18 => array(7.2, 8.1, 9.1, 11.6, 13.2, 15.1),
            19 => array(7.3, 8.2, 9.2, 11.8, 13.5, 15.4),
            20 => array(7.5, 8.4, 9.4, 12.1, 13.7, 15.7),
            21 => array(7.6, 8.6, 9.6, 12.3, 14, 16),
            22 => array(7.8, 8.7, 9.8, 12.5, 14.3, 16.4),
            23 => array(7.9, 8.9, 10, 12.8, 14.6, 16.7),
            24 => array(8.1, 9, 10.2, 13.0, 14.8, 17),
            25 => array(8.2, 9.2, 10.3, 13.3, 15.1, 17.3),
            26 => array(8.4, 9.4, 10.5, 13.5, 15.4, 17.7),
            27 => array(8.5, 9.5, 10.7, 13.7, 17.7, 18.0),
            28 => array(8.6, 9.7, 10.9, 14.0, 16.0, 18.3),
            29 => array(8.8, 9.8, 11.1, 14.2, 16.2, 18.7),
            30 => array(8.9, 10.0, 11.2, 14.4, 16.5, 19.0),
            31 => array(9.0, 10.1, 11.4, 14.7, 16.8, 19.3),
            32 => array(9.1, 10.3, 11.6, 14.9, 17.1, 19.6),
            33 => array(9.3, 10.4, 11.7, 15.1, 17.3, 20.0),
            34 => array(9.4, 10.5, 11.9, 15.4, 17.6, 20.3),
            35 => array(9.5, 10.7, 12.0, 15.6, 17.9, 20.6),
            36 => array(9.6, 10.8, 12.2, 15.8, 18.1, 20.9),
            37 => array(9.7, 10.9, 12.4, 16.0, 18.4, 21.3),
            38 => array(9.8, 11.1, 12.5, 16.3, 18.7, 21.6),
            39 => array(9.9, 11.2, 12.7, 16.5, 19.0, 22.0),
            40 => array(10.1, 11.3, 12.8, 16.7, 19.2, 22.3),
            41 => array(10.2, 11.5, 13.0, 16.9, 19.5, 22.7),
            42 => array(10.3, 11.6, 13.1, 17.2, 19.8, 23.0),
            43 => array(10.4, 11.7, 13.3, 17.4, 20.1, 23.4),
            44 => array(10.5, 11.8, 13.4, 17.6, 20.4, 23.7),
            45 => array(10.6, 12.0, 13.6, 17.8, 20.7, 24.1),
            46 => array(10.7, 12.1, 13.7, 18.1, 20.9, 24.5),
            47 => array(10.8, 12.2, 13.9, 18.3, 21.2, 24.8),
            48 => array(10.9, 12.3, 14.0, 18.5, 21.5, 25.2),
            49 => array(11.0, 12.4, 14.2, 18.8, 21.8, 25.5),
            50 => array(11.1, 12.6, 14.3, 19.0, 22.1, 25.9),
            51 => array(11.2, 12.7, 14.5, 19.2, 22.4, 26.3),
            52 => array(11.3, 12.8, 14.6, 19.4, 22.6, 26.6),
            53 => array(11.4, 12.9, 14.8, 19.7, 22.9, 27.0),
            54 => array(11.5, 13.0, 14.9, 19.9, 23.2, 27.4),
            55 => array(11.6, 13.2, 15.1, 20.1, 23.5, 27.7),
            56 => array(11.7, 13.3, 15.2, 20.3, 23.8, 28.1),
            57 => array(11.8, 13.4, 15.3, 20.6, 24.1, 28.5),
            58 => array(11.9, 13.5, 15.5, 20.8, 24.4, 28.8),
            59 => array(12.0, 13.6, 15.6, 21.0, 24.6, 29.2),
            60 => array(12.1, 13.7, 15.8, 21.2, 24.9, 29.5)),
        'MASCULINO' => array(
            0 => array(2.1, 2.5, 2.9, 3.9, 4.4, 5.0),
            1 => array(2.9, 3.4, 3.9, 5.1, 5.8, 6.6),
            2 => array(3.8, 4.3, 4.9, 6.3, 7.1, 8.0),
            3 => array(4.4, 5.0, 5.7, 7.2, 8.0, 9.0),
            4 => array(4.9, 5.6, 6.2, 7.8, 8.7, 9.7),
            5 => array(5.3, 6.0, 6.7, 8.4, 9.3, 10.4),
            6 => array(5.7, 6.4, 7.1, 8.8, 9.8, 10.9),
            7 => array(5.9, 6.7, 7.4, 9.2, 10.3, 11.4),
            8 => array(6.2, 6.9, 7.7, 9.6, 10.7, 11.9),
            9 => array(6.4, 7.1, 8.0, 9.9, 11.0, 12.3),
            10 => array(6.6, 7.4, 8.2, 10.2, 11.4, 12.7),
            11 => array(6.8, 7.5, 8.4, 10.5, 11.7, 13.0),
            12 => array(6.9, 7.7, 8.6, 10.8, 12.0, 13.3),
            13 => array(7.1, 7.9, 8.8, 11.0, 12.3, 13.7),
            14 => array(7.2, 8.1, 9.0, 11.3, 12.6, 14.0),
            15 => array(7.4, 8.3, 9.2, 11.5, 12.8, 14.3),
            16 => array(7.5, 8.4, 9.4, 11.7, 13.1, 14.6),
            17 => array(7.7, 8.6, 9.6, 12.0, 13.4, 14.9),
            18 => array(7.8, 8.8, 9.8, 12.2, 13.7, 15.3),
            19 => array(8.0, 8.9, 10.0, 12.5, 13.9, 15.6),
            20 => array(8.1, 9.1, 10.1, 12.7, 14.2, 15.9),
            21 => array(8.2, 9.2, 10.3, 12.9, 14.5, 16.2),
            22 => array(8.4, 9.4, 10.5, 13.2, 14.7, 16.5),
            23 => array(8.5, 9.5, 10.7, 13.4, 15.0, 16.8),
            24 => array(8.6, 9.7, 10.8, 13.6, 15.3, 17.1),
            25 => array(8.8, 9.8, 11.0, 13.9, 15.5, 17.5),
            26 => array(8.9, 10.0, 11.2, 14.01, 15.8, 17.8),
            27 => array(9.0, 10.1, 11.3, 14.3, 16.1, 18.1),
            28 => array(9.1, 10.2, 11.5, 14.5, 16.3, 18.4),
            29 => array(9.2, 10.4, 11.7, 14.8, 16.6, 18.7),
            30 => array(9.4, 10.5, 11.8, 15.0, 16.9, 19.0),
            31 => array(9.5, 10.7, 12.0, 15.2, 17.1, 19.3),
            32 => array(9.6, 10.8, 12.1, 15.4, 17.4, 19.6),
            33 => array(9.7, 10.9, 12.3, 15.6, 17.6, 19.9),
            34 => array(9.8, 11.0, 12.4, 15.8, 17.8, 20.2),
            35 => array(9.9, 11.2, 12.6, 16.0, 18.1, 20.4),
            36 => array(10.0, 11.3, 12.7, 16.2, 18.3, 20.7),
            37 => array(10.1, 11.4, 12.9, 16.4, 18.6, 21.0),
            38 => array(10.2, 11.5, 13.0, 16.6, 18.8, 21.3),
            39 => array(10.3, 11.6, 13.1, 16.8, 19.0, 21.6),
            40 => array(10.4, 11.8, 13.3, 17.0, 19.3, 21.9),
            41 => array(10.5, 11.9, 13.4, 17.2, 19.5, 22.1),
            42 => array(10.6, 12.0, 13.6, 17.4, 19.7, 22.4),
            43 => array(10.7, 12.1, 13.7, 17.6, 20.0, 22.7),
            44 => array(10.8, 12.2, 13.8, 17.8, 20.2, 23.0),
            45 => array(10.9, 12.4, 14.0, 18.0, 20.5, 23.3),
            46 => array(11.0, 12.5, 14.1, 18.2, 20.7, 23.6),
            47 => array(11.1, 12.6, 14.3, 18.4, 20.9, 23.9),
            48 => array(11.2, 12.7, 14.4, 18.6, 21.2, 24.2),
            49 => array(11.3, 12.8, 14.5, 18.8, 21.4, 24.5),
            50 => array(11.4, 12.9, 14.7, 19.0, 21.7, 24.8),
            51 => array(11.5, 13.1, 14.8, 19.2, 21.9, 25.1),
            52 => array(11.6, 13.2, 15.0, 19.4, 22.2, 25.4),
            53 => array(11.7, 13.3, 15.1, 19.6, 22.4, 25.7),
            54 => array(11.8, 13.4, 15.2, 19.8, 22.7, 26.0),
            55 => array(11.9, 13.5, 15.4, 20.0, 22.9, 26.3),
            56 => array(12.0, 13.6, 15.5, 20.2, 23.2, 26.6),
            57 => array(12.1, 13.7, 15.6, 20.4, 23.4, 26.9),
            58 => array(12.2, 13.8, 15.8, 20.6, 23.7, 27.2),
            59 => array(12.3, 14.0, 15.9, 20.8, 23.9, 27.6),
            60 => array(12.4, 14.1, 16.0, 21.0, 24.2, 27.9))
    );

    /**
     * Contenedoor de medidas de talla-longitud por edad para los infantes
     * @var array()
     */
    private static $rangoLongitudTalla = array(
        'FEMENINO' => array(
            0 => array(43.6, 45.4, 47.3, 51, 52.9, 54.7),
            1 => array(47.8, 49.8, 51.7, 55.6, 57.6, 59.5),
            2 => array(51, 53.0, 55, 59.1, 61.1, 63.2),
            3 => array(53.5, 55.6, 57.7, 61.9, 64.0, 66.1),
            4 => array(55.6, 57.8, 59.9, 64.3, 66.4, 68.6),
            5 => array(57.4, 59.6, 61.8, 66.2, 68.5, 70.7),
            6 => array(58.9, 61.2, 63.5, 68, 70.3, 72.5),
            7 => array(60.3, 62.7, 65, 69.6, 71.9, 74.2),
            8 => array(61.7, 64, 66.4, 71.1, 73.5, 75.8),
            9 => array(62.9, 65.3, 67.7, 72.6, 75, 77.4),
            10 => array(64.1, 66.5, 69, 73.9, 76.4, 78.9),
            11 => array(65.2, 67.7, 70.3, 75.3, 77.8, 80.3),
            12 => array(66.3, 68.9, 71.4, 76.6, 79.2, 81.7),
            13 => array(67.3, 70, 72.6, 77.8, 80.5, 83.1),
            14 => array(68.3, 71, 73.7, 79.1, 81.7, 84.4),
            15 => array(69.3, 72, 74.8, 80.2, 83, 85.7),
            16 => array(70.2, 73, 75.8, 81.4, 84.2, 87),
            17 => array(71.1, 74, 76.8, 82.5, 85.4, 88.2),
            18 => array(72, 74.9, 77.8, 83.6, 86.5, 89.4),
            19 => array(72.8, 75.8, 78.8, 84.7, 87.6, 90.6),
            20 => array(73.7, 76.7, 79.7, 85.7, 88.7, 91.7),
            21 => array(74.5, 77.5, 80.6, 86.7, 89.8, 92.9),
            22 => array(75.2, 78.4, 81.5, 87.7, 90.8, 94),
            23 => array(76, 79.2, 82.3, 88.7, 91.9, 95),
            24 => array(76.7, 80, 83.2, 89.6, 92.9, 96.1),
            25 => array(76.8, 80.0, 83.3, 89.9, 93.1, 96.4),
            26 => array(77.5, 80.8, 84.1, 90.8, 94.1, 97.4),
            27 => array(78.1, 81.5, 84.9, 91.7, 95.0, 98.4),
            28 => array(78.8, 82.2, 85.7, 92.5, 96.0, 99.4),
            29 => array(79.5, 82.9, 86.4, 93.4, 96.9, 100.3),
            30 => array(80.1, 83.6, 87.1, 94.2, 97.7, 101.3),
            31 => array(80.7, 84.3, 87.9, 95.0, 98.6, 102.2),
            32 => array(81.3, 84.9, 88.6, 95.8, 99.4, 103.1),
            33 => array(81.9, 85.6, 89.3, 96.6, 100.3, 103.9),
            34 => array(82.5, 86.2, 89.9, 97.4, 101.1, 104.8),
            35 => array(83.1, 86.8, 90.6, 98.1, 101.9, 105.6),
            36 => array(83.6, 87.4, 91.2, 98.9, 102.7, 106.5),
            37 => array(84.2, 88.0, 91.9, 99.6, 103.4, 107.3),
            38 => array(84.7, 88.6, 92.5, 100.3, 104.2, 108.1),
            39 => array(85.3, 89.2, 93.1, 101.0, 105.0, 108.9),
            40 => array(85.8, 89.8, 93.8, 101.7, 105.7, 109.7),
            41 => array(86.3, 90.4, 94.4, 102.4, 106.4, 110.5),
            42 => array(86.8, 90.9, 95.0, 103.1, 107.2, 111.2),
            43 => array(87.4, 91.5, 95.6, 103.8, 107.9, 112.0),
            44 => array(87.9, 92.0, 96.2, 104.5, 108.6, 112.7),
            45 => array(88.4, 92.5, 96.7, 105.1, 109.3, 113.5),
            46 => array(88.9, 93.1, 97.3, 105.8, 110.0, 114.2),
            47 => array(89.3, 93.6, 97.9, 106.4, 110.7, 114.9),
            48 => array(89.8, 94.1, 98.4, 107.0, 111.3, 115.7),
            49 => array(90.3, 94.6, 99.0, 107.7, 112.0, 116.4),
            50 => array(90.7, 95.1, 99.5, 108.3, 112.7, 117.1),
            51 => array(91.2, 95.6, 100.1, 108.9, 113.3, 117.7),
            52 => array(91.7, 96.1, 100.6, 109.5, 114.0, 118.4),
            53 => array(92.1, 96.6, 101.1, 110.1, 114.6, 119.1),
            54 => array(92.6, 97.1, 101.6, 110.7, 115.2, 119.8),
            55 => array(93.0, 97.6, 102.2, 111.3, 115.9, 120.4),
            56 => array(93.4, 98.1, 102.7, 111.9, 116.5, 121.1),
            57 => array(93.9, 98.5, 103.2, 112.5, 117.1, 121.8),
            58 => array(94.3, 99.0, 103.7, 113.0, 117.7, 122.4),
            59 => array(94.7, 99.5, 104.2, 113.6, 118.3, 123.1),
            60 => array(95.2, 99.9, 104.7, 114.2, 118.9, 123.7),),
        'MASCULINO' => array(
            0 => array(44.2, 46.1, 48, 51.8, 53.7, 55.6),
            1 => array(48.9, 50.8, 52.8, 56.7, 58.6, 60.6),
            2 => array(52.4, 54.4, 56.4, 60.4, 62.4, 64.4),
            3 => array(55.3, 57.3, 59.4, 63.5, 65.5, 67.6),
            4 => array(57.6, 59.7, 61.8, 66, 68, 70.1),
            5 => array(59.6, 61.7, 63.8, 68, 70.1, 72.2),
            6 => array(61.2, 63.3, 65.5, 69.8, 71.9, 74),
            7 => array(62.7, 64.8, 67, 71.3, 73.5, 75.7),
            8 => array(64, 66.2, 68.4, 72.8, 75, 77.2),
            9 => array(65.2, 67.5, 69.7, 74.2, 76.5, 78.7),
            10 => array(66.4, 68.7, 71, 75.6, 77.9, 80.1),
            11 => array(67.6, 69.9, 72.2, 76.9, 79.2, 81.5),
            12 => array(68.6, 71, 73.4, 78.1, 80.5, 82.9),
            13 => array(69.6, 72.1, 74.5, 79.3, 81.8, 84.2),
            14 => array(70.6, 73.1, 75.6, 80.5, 83, 85.5),
            15 => array(71.6, 74.1, 76.6, 81.7, 84.2, 86.7),
            16 => array(72.5, 75, 77.6, 82.8, 85.4, 88),
            17 => array(73.3, 76, 78.6, 83.9, 86.5, 89.2),
            18 => array(74.2, 76.9, 79.6, 85, 87.7, 90.4),
            19 => array(75, 77.7, 80.5, 86, 88.8, 91.5),
            20 => array(75.8, 78.6, 81.4, 87, 89.8, 92.6),
            21 => array(76.5, 79.4, 82.3, 88, 90.9, 93.8),
            22 => array(77.2, 80.2, 83.1, 89, 91.9, 94.9),
            23 => array(78, 81, 83.9, 89.9, 92.9, 95.9),
            24 => array(78.7, 81.7, 84.8, 90.9, 93.9, 97),
            25 => array(78.6, 81.7, 84.9, 91.1, 94.2, 97.3),
            26 => array(79.3, 82.5, 85.6, 92.0, 95.2, 98.3),
            27 => array(79.9, 83.1, 86.4, 92.9, 96.1, 99.3),
            28 => array(80.5, 83.8, 87.1, 93.7, 97.0, 100.3),
            29 => array(81.1, 84.5, 87.8, 94.5, 97.9, 101.2),
            30 => array(81.7, 85.1, 88.5, 95.3, 98.7, 102.1),
            31 => array(82.3, 85.7, 89.2, 96.1, 99.6, 103.0),
            32 => array(82.8, 86.4, 89.9, 96.9, 100.4, 103.9),
            33 => array(83.4, 86.9, 90.5, 97.6, 101.2, 104.8),
            34 => array(83.9, 87.5, 91.1, 98.4, 102.0, 105.6),
            35 => array(84.4, 88.1, 91.8, 99.1, 102.7, 106.4),
            36 => array(85.0, 88.7, 92.4, 99.8, 103.5, 107.2),
            37 => array(85.5, 89.2, 93.0, 100.5, 104.2, 108.0),
            38 => array(86.0, 89.8, 93.6, 101.2, 105.0, 108.8),
            39 => array(86.5, 90.3, 94.2, 101.8, 105.7, 109.5),
            40 => array(87.0, 90.9, 94.7, 102.5, 106.4, 110.3),
            41 => array(87.5, 91.4, 95.3, 103.2, 107.1, 111.0),
            42 => array(88.0, 91.9, 95.9, 103.8, 107.8, 111.7),
            43 => array(88.4, 92.4, 96.4, 104.5, 108.5, 112.5),
            44 => array(88.9, 93.0, 97.0, 105.1, 109.1, 113.2),
            45 => array(89.4, 93.5, 97.5, 105.7, 109.8, 113.9),
            46 => array(89.8, 94.0, 98.1, 106.3, 110.4, 114.6),
            47 => array(90.3, 94.4, 98.6, 106.9, 111.1, 115.2),
            48 => array(90.7, 94.9, 99.1, 107.5, 111.7, 115.9),
            49 => array(91.2, 95.4, 99.7, 108.1, 112.4, 116.6),
            50 => array(91.6, 95.9, 100.2, 108.7, 113.0, 117.3),
            51 => array(92.1, 96.4, 100.7, 109.3, 113.6, 117.9),
            52 => array(92.5, 96.9, 101.2, 109.9, 114.02, 118.6),
            53 => array(93.0, 97.4, 101.7, 110.5, 114.9, 119.2),
            54 => array(93.4, 97.8, 102.3, 111.1, 115.5, 119.9),
            55 => array(93.9, 98.3, 102.8, 111.7, 116.1, 120.6),
            56 => array(94.3, 98.8, 103.3, 112.3, 116.7, 121.2),
            57 => array(94.7, 99.3, 103.8, 112.8, 117.4, 122.9),
            58 => array(95.2, 99.7, 104.3, 113.4, 118.0, 122.6),
            59 => array(95.6, 100.2, 104.8, 114.0, 118.6, 123.2),
            60 => array(96.1, 100.7, 105.3, 114.6, 119.2, 123.9),)
    );

    /**
     * Obtiene la interpretación para el peso deacuerdo a los siguientes parametros 
     * @param String $genero 'FEMENINO' o 'MASCLINO'
     * @param int $edadMes la edad del infante de 0 a 60 meses 
     * @param decimal $pesoObjetivo datoantropometrico del mes actual
     * @return string
     */
    public static function getRangoInterpretadoPeso($genero, $edadMes, $pesoObjetivo) {
        $rango = self::$rangoPeso[$genero][$edadMes];
        if ($rango[0] > $pesoObjetivo) {
             return DatosAntropomorficos::BAJO_PESO; //OK
        } else if ($rango[0] < $pesoObjetivo && $rango[1] >= $pesoObjetivo) {
            return DatosAntropomorficos::RIESGO_BAJO_PESO; //oK
        } else if ($rango[1] < $pesoObjetivo && $rango[4] >= $pesoObjetivo) {
             return DatosAntropomorficos::PESO_NORMAL; //ok
        } else if ($rango[4] < $pesoObjetivo && $rango[5] >= $pesoObjetivo) {
            return DatosAntropomorficos::RIESGO_SOBRE_PESO;
        } else {
            return DatosAntropomorficos::SOBRE_PESO;
        }
    }

//    public static function getRangoInterpretadoPeso($genero, $edadMes, $pesoObjetivo) {
//        $rango = self::$rangoPeso[$genero][$edadMes];
//        if ($rango[1] > $pesoObjetivo) {
//            return DatosAntropomorficos::BAJO_PESO;
//        } else if ($rango[1] <= $pesoObjetivo && $rango[2] > $pesoObjetivo) {
//            return DatosAntropomorficos::RIESGO_BAJO_PESO;
//        } else if ($rango[2] <= $pesoObjetivo && $rango[3] > $pesoObjetivo) {
//            return DatosAntropomorficos::PESO_NORMAL;
//        } else if ($rango[3] <= $pesoObjetivo && $rango[4] > $pesoObjetivo) {
//            return DatosAntropomorficos::RIESGO_SOBRE_PESO;
//        } else if ($rango[4] <= $pesoObjetivo && $rango[5] > $pesoObjetivo) {
//            return DatosAntropomorficos::SOBRE_PESO;
//        } else {
//            return DatosAntropomorficos::SOBRE_PESO;
//        }
//    }
    /**
     * Obtiene la interpretación paraa la talla-logitud deacuerdo a los siguientes parametros 
     * @param String $genero 'FEMENINO' o 'MASCLINO'
     * @param int $edadMes la edad del infante de 0 a 60 meses 
     * @param decimal $tallaObjetivo datoantropometrico del mes actual
     * @return string
     */
    public static function getRangoInterpretadoTalla($genero, $edadMes, $tallaObjetivo) {
        $rango = self::$rangoLongitudTalla[$genero][$edadMes];
        if ($rango[0] > $tallaObjetivo) {
            return DatosAntropomorficos::TALLA_BAJA_SEVERA; //OK
        } else if ($rango[0] < $tallaObjetivo && $rango[1] >= $tallaObjetivo) {
            return DatosAntropomorficos::TALLA_BAJA; //oK
        } else if ($rango[1] < $tallaObjetivo && $rango[4] >= $tallaObjetivo) {
            return DatosAntropomorficos::TALLA_NORMAL; //ok
//        } else if ($rango[3] < $tallaObjetivo && $rango[4] >= $tallaObjetivo) {
//            return DatosAntropomorficos::TALLA_NORMAL;//ok
        } else if ($rango[4] < $tallaObjetivo && $rango[5] >= $tallaObjetivo) {
            return DatosAntropomorficos::TALLA_ALTA;
        } else {
            return DatosAntropomorficos::TALLA_MUY_ALTA;
        }
//    public static function getRangoInterpretadoTalla($genero, $edadMes, $tallaObjetivo) {
//        $r ango = self::$rangoLongitudTalla[$genero][$edadMes];
//        if /lse if ($rango[2] <= $tallaObjetivo && $rango[3] > $tallaObjetivo) {
//            return DatosAntropomorficos::TALLA_NORMAL;
//        } eldse if ($rango[3] <= $tallaObjetivo && $rango[4] > $tallaObjetivo) {
//            return DatosAntropomorficos::TALLA_ALTA;
//        } else if ($rango[4] <= $tallaObjetivo && $rango[5] > $tallaObjetivo) {
//            return DatosAntropomorficos::TALLA_MUY_ALTA;
//        } else {
//            return DatosAntropomorficos::TALLA_MUY_ALTA;
//        }
    }

}
